API Protocol Compliance in Object-Oriented Software

نویسندگان

  • Kevin Bierhoff
  • David Garlan
  • Peter Lee
  • Alex Aiken
چکیده

Modern software development is highly reliant on reusable APIs. APIs often define usage protocols that API clients must follow in order for code implementing the API to work correctly. Loosely speaking, API protocols define legal sequences of method calls on objects. In this work, protocols are defined based on typestates (Strom and Yemini, 1986; DeLine and Fähndrich, 2004b). Typestates leverage the familiar intuition of abstract state machines to define usage protocols. The goal of this work is to give developers comprehensive help in defining and following API protocols in object-oriented software. Two key technical contributions enable the proposed approach: (1) Object state spaces are defined with hierarchical state refinements. Hierarchical state spaces make specifications more succinct, elegantly deal with subtyping, express uncertainty, and enable more precise reasoning about aliasing. (2) A novel abstraction, called access permissions, combines typestate and aliasing information. Access permissions capture developers’ design intent regarding API protocols and enable sound modular verification of API protocol compliance while allowing a great deal of flexibility in aliasing objects. This dissertation demonstrates that typestate-based protocols with state refinement and access permissions can be used for automated, static, modular enforcement of API protocols in practical object-oriented software. Formal and empirical results show that the presented approach captures common API protocols succinctly, allows sound modular checking of protocol compliance in object-oriented code, can be automated in tools for mainstream programming languages that impose low annotation burden on developers, and can check API protocols in off-the-shelf software with higher precision than previous approaches. This work puts automatic API protocol compliance checking within reach of being used in practice. It will enable rapid and correct use of APIs during initial construction and ensure that API clients and implementations remain consistent with the specified protocol during maintenance tasks. For my parents, who have given me ability and encouragement to pursue an academic career, who have always supported me in my quest, and who have been there for me whenever I needed their help. Ich liebe Euch sehr.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Abstracting Low-Level Network Programming with ACE, A Pattern-Oriented Network Programming Framework

ing Low-Level Network Programming With ACE, a Pattern-Oriented Network Programming Framework Michael LeMay Jack Tan Computer Sci. Department Computer Sci. Department UW-Eau Claire UW-Eau Claire 2316 80th St. 105 Garfield Ave. Box 4004 Eau Claire, WI 54703 Eau Claire, WI 54702 [email protected] [email protected] Phone: (715)832-9951 Phone: (715)836-2526 Fax: (715)836-2923 Fax: (715)836-2923 Presente...

متن کامل

Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey

One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...

متن کامل

Extracting More Object Usage Scenarios for API Protocol Mining

Automatic protocol mining is a promising approach to infer precise and complete API protocols. However, the effect of the approach largely depends upon the quality of input object usage scenarios, in terms of noise and diversity. This paper aims to extract as many object usage scenarios as possible from object-oriented programs for automatic protocol mining. A large corpus of object usage scena...

متن کامل

Quality Measurement of Software By Using Coupling Metrics

Software Modularization includes the concept of procedural, object based and objects oriented languages. The metrics presented and evaluated in this paper are both ‘pure’ object–oriented metrics (Metrics for pure object oriented programming) and metrics proposed for object–oriented programming (Object-based programming). Concept of software modularization is divided in three components i) Use o...

متن کامل

Objects Identification in Object-Oriented Software Development - A Taxonomy and Survey on Techniques

Analysis and design of object oriented is onemodern paradigms for developing a system. In this paradigm, there are several objects and each object plays some specific roles. Identifying objects (and classes) is one of the most important steps in the object-oriented paradigm. This paper makes a literature review over techniques to identify objects and then presents six taxonomies for them. The f...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009